'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);
  //注册
  router.post('/api/registry',controller.user.registry);

  //登录
  router.post('/api/login',controller.user.login);

  //restful风格接口定义
  router.resources('/api/score',controller.score);

  //获取左侧菜单接口
  router.get('/api/menu',controller.user.menu);

  //获取未录入成绩的人员名单
  router.get('/api/notScore',controller.score.notScore);

  //搜索
  router.get('/api/search',controller.score.search);
};
